package com.woniuxy.meal.service;

import com.woniuxy.meal.service.dto.SubmitCartDto;
import com.woniuxy.meal.entity.UserCart;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.meal.form.AddCartForm;
import com.woniuxy.meal.form.SubmitCartForm;
import com.woniuxy.meal.form.UpdateCartForm;
import com.woniuxy.meal.service.dto.UserCartDto;

import java.util.List;

/**
 * <p>
 * 用户购物车表 服务类
 * </p>
 *
 * @author zz
 * @since 2023年06月16日
 */
public interface UserCartService extends IService<UserCart> {

    void addCart(AddCartForm form, Long userId) throws Exception;

    void updateCart(UpdateCartForm form, Long userId) throws Exception;

    void deleteCart(String foodId, Long userId) throws Exception;

    List<UserCartDto> showCart(Long userId) throws Exception;

    SubmitCartDto submitCart(SubmitCartForm submitCartForm,Long userId) throws Exception;

    UserCartDto showCartByStoreId(Long userId, Long storeId) throws Exception;
}
